<template>
<view>
<!-- 详细机况弹窗 -->
<view class="mach_det" v-if="show_det!=0">
	<view class="mach_tit_box">
		<view class="m_ba_butt">
			<label @tap="canlce_det">返回</label>
		</view>
		<view class="mach_tit">机况详细描述表</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">驾驶室</view>
		<view class="mci_cont">
			<view>
				<label>是否有碰撞：</label>
				<label :class="'lab_item ' + (carInfo.cab_worn==0?'lai_cor':'')">无</label>
				<label :class="'lab_item ' + (carInfo.cab_worn==1?'lai_cor':'')">轻微</label>
				<label :class="'lab_item ' + (carInfo.cab_worn==2?'lai_cor':'')">有</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">电动油门</view>
		<view class="mci_cont">
			<view>
				<label>是否正常：</label>
				<label :class="'lab_item ' + (carInfo.ele_gac==0?'lai_cor':'')">正常</label>
				<label :class="'lab_item ' + (carInfo.ele_gac==1?'lai_cor':'')">手拉</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">发动机是否有废气</view>
		<view class="mci_cont">
			<view>
				<label>上排气：</label>
				<label :class="'lab_item ' + (carInfo.enginewaste_on==0?'lai_cor':'')">无</label>
				<label :class="'lab_item ' + (carInfo.enginewaste_on==1?'lai_cor':'')">轻微</label>
				<label :class="'lab_item ' + (carInfo.enginewaste_on==2?'lai_cor':'')">有</label>
			</view>
			<view>
				<label>下排气：</label>
				<label :class="'lab_item ' + (carInfo.enginewaste_down==0?'lai_cor':'')">无</label>
				<label :class="'lab_item ' + (carInfo.enginewaste_down==1?'lai_cor':'')">轻微</label>
				<label :class="'lab_item ' + (carInfo.enginewaste_down==2?'lai_cor':'')">有</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">挂臂情况</view>
		<view class="mci_cont">
			<view>
				<label>大臂：</label>
				<label :class="'lab_item ' + (carInfo.fallarm_b==0?'lai_cor':'')">无</label>
				<label :class="'lab_item ' + (carInfo.fallarm_b==1?'lai_cor':'')">轻微</label>
				<label :class="'lab_item ' + (carInfo.fallarm_b==2?'lai_cor':'')">有</label>
			</view>
			<view>
				<label>小臂：</label>
				<label :class="'lab_item ' + (carInfo.fallarm_s==0?'lai_cor':'')">无</label>
				<label :class="'lab_item ' + (carInfo.fallarm_s==1?'lai_cor':'')">轻微</label>
				<label :class="'lab_item ' + (carInfo.fallarm_s==2?'lai_cor':'')">有</label>
			</view>
			<view>
				<label>铲斗：</label>
				<label :class="'lab_item ' + (carInfo.fallarm_c==0?'lai_cor':'')">无</label>
				<label :class="'lab_item ' + (carInfo.fallarm_c==1?'lai_cor':'')">轻微</label>
				<label :class="'lab_item ' + (carInfo.fallarm_c==2?'lai_cor':'')">有</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">转盘间隙情况</view>
		<view class="mci_cont">
			<view>
				<label>上下间隙：</label>
				<label :class="'lab_item ' + (carInfo.tablegap_sx==0?'lai_cor':'')">无</label>
				<label :class="'lab_item ' + (carInfo.tablegap_sx==1?'lai_cor':'')">轻微</label>
				<label :class="'lab_item ' + (carInfo.tablegap_sx==2?'lai_cor':'')">有</label>
			</view>
			<view>
				<label>左右间隙：</label>
				<label :class="'lab_item ' + (carInfo.tablegap_zy==0?'lai_cor':'')">无</label>
				<label :class="'lab_item ' + (carInfo.tablegap_zy==1?'lai_cor':'')">轻微</label>
				<label :class="'lab_item ' + (carInfo.tablegap_zy==2?'lai_cor':'')">有</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">怠速撑车情况</view>
		<view class="mci_cont">
			<view>
				<label>是否能撑车：</label>
				<label :class="'lab_item ' + (carInfo.brace_car==0?'lai_cor':'')">正常</label>
				<label :class="'lab_item ' + (carInfo.brace_car==1?'lai_cor':'')">撑不完全</label>
				<label :class="'lab_item ' + (carInfo.brace_car==2?'lai_cor':'')">撑不起</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">单边行走情况</view>
		<view class="mci_cont">
			<view>
				<label>左边</label>
				<label :class="'lab_item ' + (carInfo.onewalk_z==0?'lai_cor':'')">正常</label>
				<label :class="'lab_item ' + (carInfo.onewalk_z==1?'lai_cor':'')">慢</label>
				<label :class="'lab_item ' + (carInfo.onewalk_z==2?'lai_cor':'')">走不动</label>
			</view>
			<view>
				<label>右边</label>
				<label :class="'lab_item ' + (carInfo.onewalk_y==0?'lai_cor':'')">正常</label>
				<label :class="'lab_item ' + (carInfo.onewalk_y==1?'lai_cor':'')">慢</label>
				<label :class="'lab_item ' + (carInfo.onewalk_y==2?'lai_cor':'')">走不动</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">行走时减速是否异常</view>
		<view class="mci_cont">
			<view>
				<label>左边</label>
				<label :class="'lab_item ' + (carInfo.walkslow_z==0?'lai_cor':'')">无</label>
				<label :class="'lab_item ' + (carInfo.walkslow_z==1?'lai_cor':'')">有</label>
			</view>
			<view>
				<label>右边</label>
				<label :class="'lab_item ' + (carInfo.walkslow_y==0?'lai_cor':'')">无</label>
				<label :class="'lab_item ' + (carInfo.walkslow_y==1?'lai_cor':'')">有</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">怠速憋车情况</view>
		<view class="mci_cont">
			<view>
				<label>是否正常：</label>
				<label :class="'lab_item ' + (carInfo.idling_holdcar==0?'lai_cor':'')">正常</label>
				<label :class="'lab_item ' + (carInfo.idling_holdcar==1?'lai_cor':'')">有烟</label>
				<label :class="'lab_item ' + (carInfo.idling_holdcar==2?'lai_cor':'')">熄火</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">憋车发动机烟量</view>
		<view class="mci_cont">
			<view>
				<label>大油门：</label>
				<label :class="'lab_item ' + (carInfo.holdsmoke_b==0?'lai_cor':'')">正常</label>
				<label :class="'lab_item ' + (carInfo.holdsmoke_b==1?'lai_cor':'')">量小</label>
				<label :class="'lab_item ' + (carInfo.holdsmoke_b==2?'lai_cor':'')">量大</label>
			</view>
			<view>
				<label>小油门：</label>
				<label :class="'lab_item ' + (carInfo.holdsmoke_s==0?'lai_cor':'')">正常</label>
				<label :class="'lab_item ' + (carInfo.holdsmoke_s==1?'lai_cor':'')">量小</label>
				<label :class="'lab_item ' + (carInfo.holdsmoke_s==2?'lai_cor':'')">量大</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">设备速度情况</view>
		<view class="mci_cont">
			<view>
				<label>是否正常：</label>
				<label :class="'lab_item ' + (carInfo.device_speed==0?'lai_cor':'')">快</label>
				<label :class="'lab_item ' + (carInfo.device_speed==1?'lai_cor':'')">慢</label>
				<label :class="'lab_item ' + (carInfo.device_speed==2?'lai_cor':'')">无动作</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">开裂情况</view>
		<view class="mci_cont">
			<view>
				<label>大臂：</label>
				<label :class="'lab_item ' + (carInfo.crack_b==0?'lai_cor':'')">无</label>
				<label :class="'lab_item ' + (carInfo.crack_b==1?'lai_cor':'')">有</label>
			</view>
			<view>
				<label>小臂：</label>
				<label :class="'lab_item ' + (carInfo.crack_s==0?'lai_cor':'')">无</label>
				<label :class="'lab_item ' + (carInfo.crack_s==1?'lai_cor':'')">有</label>
			</view>
			<view>
				<label>铲斗：</label>
				<label :class="'lab_item ' + (carInfo.crack_c==0?'lai_cor':'')">无</label>
				<label :class="'lab_item ' + (carInfo.crack_c==1?'lai_cor':'')">有</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">设备运行大件是否有异响</view>
		<view class="mci_cont">
			<view>
				<label>发动机：</label>
				<label :class="'lab_item ' + (carInfo.runbig_fdj==0?'lai_cor':'')">无</label>
				<label :class="'lab_item ' + (carInfo.runbig_fdj==1?'lai_cor':'')">有</label>
			</view>
			<view>
				<label>主阀：</label>
				<label :class="'lab_item ' + (carInfo.runbig_zf==0?'lai_cor':'')">无</label>
				<label :class="'lab_item ' + (carInfo.runbig_zf==1?'lai_cor':'')">有</label>
			</view>
			<view>
				<label>回转马达：</label>
				<label :class="'lab_item ' + (carInfo.runbig_hzmd==0?'lai_cor':'')">无</label>
				<label :class="'lab_item ' + (carInfo.runbig_hzmd==1?'lai_cor':'')">有</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">链轨链桶情况</view>
		<view class="mci_cont">
			<view>
				<label>左链接</label>
				<label :class="'lab_item ' + (carInfo.chain_z==0?'lai_cor':'')">无</label>
				<label :class="'lab_item ' + (carInfo.chain_z==1?'lai_cor':'')">有</label>
			</view>
			<view>
				<label>右链接</label>
				<label :class="'lab_item ' + (carInfo.chain_y==0?'lai_cor':'')">无</label>
				<label :class="'lab_item ' + (carInfo.chain_y==1?'lai_cor':'')">有</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">X架情况</view>
		<view class="mci_cont">
			<view>
				<label>是否正常：</label>
				<label :class="'lab_item ' + (carInfo.x_frame==0?'lai_cor':'')">正常</label>
				<label :class="'lab_item ' + (carInfo.x_frame==1?'lai_cor':'')">有开裂</label>
				<label :class="'lab_item ' + (carInfo.x_frame==2?'lai_cor':'')">需更换</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">锤及管路</view>
		<view class="mci_cont">
			<view>
				<label>锤：</label>
				<label :class="'lab_item ' + (carInfo.mace==0?'lai_cor':'')">带</label>
				<label :class="'lab_item ' + (carInfo.mace==1?'lai_cor':'')">需拆</label>
				<label :class="'lab_item ' + (carInfo.mace==2?'lai_cor':'')">无</label>
			</view>
			<view>
				<label>管路：</label>
				<label :class="'lab_item ' + (carInfo.tube==0?'lai_cor':'')">带</label>
				<label :class="'lab_item ' + (carInfo.tube==1?'lai_cor':'')">需拆</label>
				<label :class="'lab_item ' + (carInfo.tube==2?'lai_cor':'')">无</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">手续情况</view>
		<view class="mci_cont">
			<view>
				<label>发票：</label>
				<label :class="'lab_item ' + (carInfo.routine_fp==0?'lai_cor':'')">有</label>
				<label :class="'lab_item ' + (carInfo.routine_fp==1?'lai_cor':'')">无</label>
			</view>
			<view>
				<label>合格证：</label>
				<label :class="'lab_item ' + (carInfo.routine_hgz==0?'lai_cor':'')">有</label>
				<label :class="'lab_item ' + (carInfo.routine_hgz==1?'lai_cor':'')">无</label>
			</view>
		</view>
	</view>
	<view class="mach_butt">
		<button class="mc_bu" @tap="canlce_det">确定</button>
	</view>
</view>
<swiper :autoplay="autoplay" @change="changblock" class="solid_border" :duration="duration" :indicatorDots="indicatorDots" :interval="interval">
	<swiper-item v-for="(item, index) in imgUrls" :key="index">
		<image @tap="imgs" class="solid_border" :data-index="index" :data-src="item" mode="aspectFill" :src="item"></image>
	</swiper-item>
</swiper>
<view class="index">
	<text style="padding:1rpx 15rpx;background:rgba(0,0,0,0.4);border-radius: 100rpx;">浏览{{carInfo.browse}}次</text>
	<text style="padding:1rpx 22rpx;background:rgba(0,0,0,0.4);border-radius: 100rpx;float:right;display:block;line-height: 30rpx;margin-top:10rpx;">{{swiperCurrent}}/{{imgUrls.length}}</text>
</view>
<view class="car_title">【{{carInfo.name}}】  <label v-if="carInfo.class==46">{{carInfo.agelimit==0?'全新车':'车龄 '+carInfo.agelimit+'年'}}</label></view>
<view class="car_num">发布时间：{{carInfo.timestr}}</view>
<!-- 车辆介绍 -->
<!-- <block wx:if="{{carInfo.synopsis!=null&&carInfo.synopsis!=''}}">
	<view class="intr_box">{{carInfo.synopsis}}</view>
</block> -->
<!-- 其他信息展示 重量：{{carInfo.weight}}吨-->
<view class="o_info_box">机主：{{o_name}}  <label v-if="carInfo.class==46">{{carInfo.gearbox==0?'手自一体':''}}{{carInfo.gearbox==1?'手动档':''}}{{item.carInfo==2?'自动档':''}} </label><label v-if="carInfo.exhaust!='undefined'&&carInfo.exhaust!=null&&carInfo.exhaust!=''">排量：{{carInfo.exhaust}}T</label></view>
<view class="lab_addr">
	<view class="la_item lab_box">
		<!-- <block wx:for="{{carInfo.label}}" wx:key="index">
			<label>{{item}}</label>
		</block> -->
		<block v-if="carInfo.has_invoice==1"><label>有发票</label></block>
		<block v-if="carInfo.has_certificate==1"><label>有合格证</label></block>
	</view>
	<!-- <view class="la_item addr_box">{{carInfo.province}}-{{carInfo.city}}</view>
	<view class="clear"></view> -->
</view>

<view class="car_price">
	<!-- <text class="car_price_baojia">车主报价</text> -->
	<text class="car_price_num">{{carInfo.price}}万   <text style="margin-left: 20rpx;font-size: 24rpx;">首付{{getPayment(carInfo.price)}}万</text></text>
	<!-- <button bindtap="store" class="index_modle_btn" data-uid="{{carInfo.uid}}">进店逛逛</button>
    <button bindtap="home" class="index_modle_btn" style="margin-right:30rpx;">返回首页</button> -->
	<button v-if="isShop == 1" class="index_modle_btn" @tap="tel">联系电话</button>
</view>
<view class="top_nav"></view>
<!-- <view bindtap="daikuan" class="daikuan_border">
  <image class="daikuan_border_img" src="../../image/daikuan.png"></image>贷款
  <view class="daikuan_right">具体方案请咨询销售顾问
    <image class="daikuan_right_img" src="../../image/jiantou_btn2.png"></image>
  </view>
</view> -->
<!-- <view class="modle_nav">
  <view class="modle_nav_biaoji"></view>
  <text>服务保障</text>
</view> -->
<!-- <view class="choose_area">
  <view bindtap="toast_second" class="choose_area_modle" wx:for="{{carInfo.ensure}}" wx:key="4">
    <image class="choose_area_modle_img" src="{{item['image']}}"></image>
    <view class="choose_area_modle_title">{{item['name']}}</view>
  </view>
</view> -->
<view class="modle_nav" style="border:none;padding-bottom:1.5rpx;">
	<view class="modle_left">
		<view class="modle_nav_biaoji"></view>
		<text>设备介绍</text>
	</view>
	<view class="right">
		<button class="index_modle_btn" @tap="telContact">联系贷款</button>
	</view>
</view>
<view class="car_message car_message_index">

	<view class="car_message_btm">{{carInfo.buydate}}</view>
	<view class="car_message_top">生产日期</view>
</view>
<!-- <view class="car_message car_message_second">

	<view class="car_message_btm">{{carInfo.work_hours}}小时</view>
	<view class="car_message_top">小时数</view>
</view> -->
<!-- <view class="car_message car_message_index">
  <view class="car_message_top">变速箱</view>
  <view class="car_message_btm" wx:if="{{carInfo.gearbox==0}}">手自一体</view>
  <view class="car_message_btm" wx:if="{{carInfo.gearbox==1}}">手动档</view>
  <view class="car_message_btm" wx:if="{{carInfo.gearbox==2}}">自动挡</view>
</view> -->
<!-- <view class="car_message car_message_second">
  <view class="car_message_top">排气量</view>
  <view class="car_message_btm">{{carInfo.exhaust}}</view>
</view> -->
<view class="car_message car_message_index">

	<view class="car_message_btm">{{carInfo.province}}-{{carInfo.city}}</view>
	<view class="car_message_top">所在地</view>
</view>
<view class="car_message car_message_second">

	<view class="car_message_btm">{{carInfo.create_time}}</view>
	<view class="car_message_top">发布时间</view>
</view>
<!-- <view class="car_message car_message_index" style="width:690rpx">
  <view class="car_message_top">看车地点</view>
  <view class="car_message_btm_btm">{{carInfo.caraddress}}</view>
</view> -->
<view v-if="carInfo.x&&carInfo.y">
	<view class="modle_nav" style="border:none;padding-bottom:1.5rpx;border-top:1rpx solid #f9f9f9;font-size: 24rpx;color: #333333;">
		<view class="daohang_text">
			<image class="modle_nav_dizhiImg" src="/static/pages/image/dingwei2_btn.png"></image>{{carInfo.caraddress}}
		</view>
		<button @tap="company" class="index_modle_btn" :data-name="carInfo.name" :data-x="carInfo.x" :data-y="carInfo.y" style="margin-top:17rpx;">快速导航</button>
	</view>
</view>
<view class="nav"></view>
<!-- <view class="more_butt">
	<button bindtap="click_toDet">点击查看更多详细机况</button>
</view> -->
<view class="nav"></view>
<view class="sb_img_box">
	<view class="sb_tit">设备实拍</view>
	<view class="img_list">
		<video class="vid_box" v-if="carInfo.video!=''" show-fullscreen-btn="true" controls="true" :poster="carInfo.carimg1" :src="carInfo.video"></video>
		<view v-for="(item, index) in carInfo.image" :key="index" class="il_item">
			<image mode="widthFix" :src="item.img_patch"></image>
		</view>
	</view>
</view>
<!-- <view class="modle_nav">
  <view class="modle_nav_biaoji"></view>
  <text>车辆介绍</text>
</view>
<view class="modle_nav_carText" wx:if="{{carInfo.synopsis}}">{{carInfo.synopsis}}</view>
<view wx:for="{{carInfo.image}}">
  <image bindtap="previewImage" class="modle_nav_carImg" data-src="{{item.img_patch}}" mode="widthFix" src="{{item.img_patch}}"></image>
  <view class="jieshao_view" wx:if="{{item.intro}}">
    {{item.intro}}
  </view>
</view>
<view class="guanggao" wx:if="{{unitid!=123}}">
  <ad unitId="{{unitid}}"></ad>
</view>
<view class="nav"></view>
<view class="modle_nav">
  <view class="modle_nav_biaoji"></view>
  <text>猜你喜欢</text>
</view>
<view class="modle" wx:for="{{carInfo.car_list}}" wx:for-index="indexs" wx:key="6">
  <view class="tuijian" wx:if="{{item['top_status']}}">推荐</view>
  <image bindtap="detile" class="modle_img" data-id="{{item.id}}" mode="aspectFill" src="{{item.carimg}}"></image>
  <view bindtap="detile" class="message_border" data-id="{{item.id}}">
    <view class="modle_name">
      <view class="ziying" wx:if="{{item.is_vip==1}}">认证车商</view>
      <view class="ziying" wx:if="{{item.uid==0}}">自营</view>
      {{item.name}} {{item.agelimit==0?'全新车':'车龄 '+item.agelimit+'年'}} {{item.exhaust}} {{item.gearbox==0?'手自一体':''}}{{item.gearbox==1?'手动档':''}}{{item.gearbox==2?'自动档':''}}</view>
    <view class="modle_chexing"> {{item.year}} | {{item.km}}万公里
    </view>
    <view class="modle_price">{{item.price}}万
    </view>
  </view>
</view>
<view class="nav"></view>
<view class="modle_nav">
  <view class="modle_nav_biaoji"></view>
  <text>交易提醒</text>
</view>
<view class="btm_message_border">
  <view class="btm_message">
    <text>{{carInfo.market.remind}}</text>
  </view>
</view>-->
<view class="nav_nav"></view>
<view class="btm_nav">
	<view @tap="tel" v-if="isShop == 1" class="btm_nav_big_index btm_bott_item">询问底价</view>
	<view @tap="follow" class="btm_nav_small btm_bott_item">
		<image class="btm_nav_small_img" :hidden="follow_status" src="/static/pages/image/shoucangwdj_btn.png"></image>
		<image class="btm_nav_small_img" :hidden="!follow_status" src="/static/pages/image/shoucangwdj_btn_copy.png"></image>
		<view class="btm_nav_small_title">收藏</view>
	</view>
	<view @tap="yan" class="btm_nav_small" style="display:none;" data-form_type="1">
		<image class="btm_nav_small_img" src="/static/pages/image/liuyan_btn.png"></image>
		<view class="btm_nav_small_title">留言</view>
	</view>
	<view @tap="yan" class="btm_nav_small" style="display:none;" data-form_type="2">
		<image class="btm_nav_small_img" src="/static/pages/image/jubao_btn.png"></image>
		<view class="btm_nav_small_title">举报</view>
	</view>

	<button @tap="mengceng_Block" class="btm_nav_big_second" style="display:none;">立即分享
	</button>
</view>
<view class="page" v-if="mengcengBlock==1">
	<view @tap="mengceng_none" class="click_none"></view>
	<view :class="'block_modle_view ' + (modleBlock==1?'modle_view_block':'modle_view_none')">
		<button :class="'block_modle_view_modle ' + (modleBlock==1?'modle_index_block':'modle_index_none')" open-type="share">
			<image class="block_modle_view_modle_img" src="/static/pages/image/lijifenxiang.png"></image>
			<view class="block_modle_view_modle_title">立即分享</view>
		</button>
		<button @tap="poster" :class="'block_modle_view_modle ' + (modleBlock==1?'modle_second_block':'modle_second_none')">
			<image class="block_modle_view_modle_img" src="/static/pages/image/shengchenghaibao.png"></image>
			<view class="block_modle_view_modle_title">生成海报</view>
		</button>
	</view>
</view>
</view>
</template>

<script>
var app = getApp();

export default {
  data() {
    return {
      indicatorDots: !1,
      autoplay: !1,
      interval: 5e3,
      duration: 1e3,
      id: 0,
      carInfo: [],
      o_name: '',
      isShow: !1,
      follow_status: !1,
      swiperCurrent: 1,
      lunboLength: 0,
      imgUrls: [],
      share_id: 0,
      modleBlock: 0,
      mengcengBlock: 0,
      unitid: 123,
      appscene: 0,
      // 是否显示机况详情
      show_det: 0,
      webUrl: '',
      is_mem: '',
      follow: "",
      mapx: "",
      mapy: "",
      mapname: "",
	  isShop:null
    };
  },

  components: {},
  props: {},
  onShow() {
  	this.getIsShop()
  },
  onLoad: function (a) {
    app.globalData.imgUrl(), this.setData({
      webUrl: wx.getStorageSync('webUrl')
    });
    console.log('域名：', wx.getStorageSync('webUrl'));
    console.log(app.globalData.data.appscene), 1007 != app.globalData.data.appscene && 1008 != app.globalData.data.appscene && 1011 != app.globalData.data.appscene && 1012 != app.globalData.data.appscene && 1013 != app.globalData.data.appscene && 1014 != app.globalData.data.appscene || this.setData({
      appscene: 1
    }), this.setData({
      lunboLength: this.imgUrls.length
    });
    var t = 0,
        e = decodeURIComponent(a.scene);
    console.log(e), 0 < e ? t = e : 0 < a.id && (t = a.id), this.id = t, this.car_infoFun(), this.info_setFun(0);
    this.isMember();
  },
  onShareAppMessage: function (a) {
    return {
      title: this.carInfo.name,
      path: "/pagesA/home/carMessage/carMessage?id=" + this.id + "&share_id=1",
      success: function (a) {},
      fail: function (a) {}
    };
  },
  methods: {
	  getPayment(price) {
	  	let num = Number(price) / 2
	  	return num.toFixed('2')
	  },
	 getIsShop() {
	 	app.globalData.util.request({
	 		url: "entry/wxapp/Api",
	 		data: {
	 			m: "monai_market",
	 			r: "home.index.is_shop"
	 		},
	 		success: res => {
	 			let {data} = res.data
	 			this.isShop = data
	 		},
	 		fail: res => {
	 
	 		}
	 	});
	 },
    changblock: function (a) {
      console.log(a.detail.current), this.setData({
        swiperCurrent: 1 + a.detail.current
      });
    },
    mengceng_Block: function () {
      this.setData({
        mengcengBlock: 1,
        modleBlock: 1
      });
    },
    mengceng_none: function () {
      this.setData({
        modleBlock: 0
      });
      var a = this;
      setTimeout(function () {
        a.setData({
          mengcengBlock: 0
        });
      }, 700);
    },
    //点击查看更多机况按钮
    click_toDet: function () {
      var that = this;
      that.setData({
        show_det: 1
      });
    },
    //关闭更多机况详情
    canlce_det: function () {
      var that = this;
      that.setData({
        show_det: 0
      });
    },
    // 判断是否为会员
    isMember: function () {
      var that = this;
      app.globalData.util.request({
        url: "entry/wxapp/Api",
        data: {
          m: "monai_market",
          r: "home.index.checkvip",
          uid: app.globalData.getuid()
        },
        cachetime: "0",
        success: function (res) {
          console.log('会员判断：', res.data);
          that.setData({
            is_mem: res.data.data
          });
        },
        fail: function (res) {}
      });
    },
    info_setFun: function () {
      var t = this;
      app.globalData.util.request({
        url: "entry/wxapp/Api",
        data: {
          m: "monai_market",
          r: "home.index.info_set"
        },
        cachetime: "0",
        success: function (a) {
          console.log(a), 2 == a.data.data.flow_set && "" != a.data.data.flow_set_id && t.setData({
            unitid: a.data.data.flow_set_id
          });
        }
      });
    },
    car_infoFun: function () {
      var g = this;
      app.globalData.util.request({
        url: "entry/wxapp/Api",
        data: {
          m: "monai_market",
          r: "home.index.car_info",
          id: this.id
        },
        cachetime: "0",
        success: function (a) {
          console.log('车辆信息：', a.data);
          var t = !1;

          if (a.data.data.follow && 0 < a.data.data.follow.length) {
            var e = !0,
                n = !1,
                i = void 0;

            try {
              for (var o, s = a.data.data.follow[Symbol.iterator](); !(e = (o = s.next()).done); e = !0) {
                if (o.value.uid == wx.getStorageSync("uid")) {
                  t = !0;
                  break;
                }
              }
            } catch (a) {
              n = !0, i = a;
            } finally {
              try {
                !e && s.return && s.return();
              } finally {
                if (n) throw i;
              }
            }
          }

          var r = [],
              c = !0,
              u = !1,
              d = void 0;

          try {
            for (var l, p = a.data.data.image[Symbol.iterator](); !(c = (l = p.next()).done); c = !0) {
              var f = l.value;
              r.push(f.img_patch);
            }
          } catch (a) {
            u = !0, d = a;
          } finally {
            try {
              !c && p.return && p.return();
            } finally {
              if (u) throw d;
            }
          }

          var name = a.data.data.relname;
          var str = '';
          str = name.substring(0, 1);

          for (var i = 0; i < name.length - 1; i++) {
            str += '*';
          }

          g.setData({
            carInfo: a.data.data,
            o_name: str,
            follow_status: t,
            imgUrls: r
          });
        },
        fail: function () {
          wx.showModal({
            title: "提示",
            content: "该设备已售出!",
            showCancel: !1,
            success: function (a) {
              a.confirm && wx.navigateBack({});
            }
          });
        }
      });
    },
    daikuan: function () {
      wx.navigateTo({
        url: "/pagesA/loan/index?carid=" + this.id
      });
    },
    hideDialog: function () {
      this.setData({
        isShow: !this.isShow
      });
    },
    home: function () {
      wx.switchTab({
        url: "/pages/index/index"
      });
    },
    updateUserInfo: function (a) {
      var t = this;
      app.globalData.util.getUserInfo(function (a) {
        wx.setStorageSync("uid", a.memberInfo.uid), t.hideDialog();
      }, a.detail);
    },
    //判断是否能询价
    check_xj: function () {
      var that = this;
      app.globalData.util.request({
        url: "entry/wxapp/Api",
        data: {
          m: "monai_market",
          r: "home.index.vip_seetel",
          uid: app.globalData.getuid()
        },
        cachetime: "0",
        success: function (res) {
          console.log('判断是否能询价：', res.data);
          that.setData({
            is_mem: res.data.data
          });
        },
        fail: function (res) {}
      });
    },
	telContact(){
		wx.makePhoneCall({
		  phoneNumber: '18087455988',
		  success: function () {}
		});	
	},
    tel: function () {
      var that = this;
      app.globalData.util.request({
        url: "entry/wxapp/Api",
        data: {
          m: "monai_market",
          r: "home.index.vip_seetel",
          uid: app.globalData.getuid()
        },
        cachetime: "0",
        success: function (res) {
          console.log('判断是否能询价：', res.data);

          if (res.data.data == '1') {
            //会员
            wx.makePhoneCall({
              phoneNumber: that.carInfo.phone,
              success: function () {}
            });
          } else {
            // if (res.data.message == '非会员！' || res.data.message == '非会员!') {
            //     //非会员
            //     wx.showModal({
            //         title: '温馨提示',
            //         content: '您还不是会员，不能使用此功能。是否成为会员？',
            //         showCancel: true,
            //         success: function (e) {
            //             if (e.confirm) {
            //                 console.log('点击了确定');
            //                 wx.navigateTo({
            //                     url: '../../member/member',
            //                 })
            //             } else {
            //                 console.log('点击了取消');
            //             }
            //         }
            //     })
            // } else {
            // wx.showToast({
            //     title: res.data.message,
            //     icon: 'none'
            // })
            wx.showModal({
              title: '温馨提示',
              content: res.data.message,
              showCancel: true,
              success: function (e) {
                if (e.confirm) {
                  app.globalData.util.request({
                    url: "entry/wxapp/Telpay",
                    data: {
                      m: "monai_market",
                      // r: "me.follow",
                      uid: app.globalData.getuid(),
                      price: res.data.data
                    },
                    cachetime: "0",
                    success: function (a) {
                      wx.requestPayment({
                        timeStamp: a.data.data.timeStamp,
                        nonceStr: a.data.data.nonceStr,
                        package: a.data.data.package,
                        signType: a.data.data.signType,
                        paySign: a.data.data.paySign,

                        success(result) {
                          // wx.showToast({
                          //     title: '支付成功',
                          //     icon: 'success',
                          //     duration: 2000,
                          // })
                          wx.makePhoneCall({
                            phoneNumber: that.carInfo.phone,
                            success: function () {}
                          });
                        },

                        fail(err) {
                          wx.showToast({
                            title: '支付失败',
                            icon: 'none',
                            duration: 2000
                          });
                        }

                      });
                    }
                  });
                } else {
                  console.log('点击了取消');
                }
              }
            }); // }
          }
        },
        fail: function (res) {
          console.log('aaa', res);

          if (res.data.message == '会员已到期') {
            //非会员
            wx.showModal({
              title: '温馨提示',
              content: '您的会员已到期，不能使用此功能。是否续费会员？',
              showCancel: true,
              success: function (e) {
                if (e.confirm) {
                  console.log('点击了确定');
                  // wx.navigateTo({
                  //   url: '../../member/member'
                  // });
                } else {
                  console.log('点击了取消');
                }
              }
            });
          } else {
            wx.showToast({
              title: res.data.message,
              icon: 'none'
            });
          }
        }
      }); // return;
      // if (that.data.is_mem == '0') {
      //     //非会员
      //     wx.showModal({
      //         title: '温馨提示',
      //         content: '您还不是会员，不能使用此功能。是否成为会员？',
      //         showCancel: true,
      //         success: function (e) {
      //             if (e.confirm) {
      //                 console.log('点击了确定');
      //                 wx.navigateTo({
      //                     url: '../../member/member',
      //                 })
      //             } else {
      //                 console.log('点击了取消');
      //             }
      //         }
      //     })
      // } else {
      //     //会员
      //     wx.makePhoneCall({
      //         phoneNumber: that.data.carInfo.phone,
      //         success: function () {}
      //     });
      // }
    },
    follow: function () {
      var t = this;
      app.globalData.util.getUserInfo(function (a) {
        a.memberInfo || that.setData({
          isShow: !0
        });
      }), app.globalData.util.request({
        url: "entry/wxapp/Api",
        data: {
          m: "monai_market",
          r: "me.follow",
          uid: app.globalData.getuid(),
          type: 2,
          ucar_id: this.carInfo.id
        },
        cachetime: "0",
        success: function (a) {
          t.setData({
            follow_status: !t.follow_status,
            follow: a.data.data
          });
        }
      });
    },
    yan: function (a) {
      var t = app.globalData.getAttr(a, "form_type");
      wx.navigateTo({
        url: "/pagesA/home/jubao/jubao?car_uid=" + this.carInfo.uid + "&form_type=" + t + "&car_id=" + this.id
      });
    },
    store: function (a) {
      var t = app.globalData.getAttr(a, "uid");
      wx.navigateTo({
        url: "../../store/index?uid=" + t
      });
    },
    detile: function (a) {
      var t = app.globalData.getAttr(a, "id");
      wx.navigateTo({
        url: "/pagesA/home/carMessage/carMessage?id=" + t
      });
    },
    company: function (a) {
      var t = app.globalData.getAttr(a, "x"),
          e = app.globalData.getAttr(a, "y"),
          n = app.globalData.getAttr(a, "name");
      t && e && wx.getLocation({
        type: "gcj02",
        success: function (a) {
          wx.openLocation({
            latitude: parseFloat(t),
            longitude: parseFloat(e),
            scale: 14,
            name: n
          });
        }
      });
    },
    previewImage: function (a) {
      var t = app.globalData.getAttr(a, "src"),
          e = [],
          n = !0,
          i = !1,
          o = void 0;

      try {
        for (var s, r = this.carInfo.image[Symbol.iterator](); !(n = (s = r.next()).done); n = !0) {
          var c = s.value;
          e.push(c.img_patch);
        }
      } catch (a) {
        i = !0, o = a;
      } finally {
        try {
          !n && r.return && r.return();
        } finally {
          if (i) throw o;
        }
      }

      wx.previewImage({
        current: t,
        urls: e
      });
    },
    imgs: function (a) {
      var t = app.globalData.getAttr(a, "src"),
          e = this.imgUrls;
      wx.previewImage({
        current: t,
        urls: e
      });
    },
    tomap: function () {
      var t = this;
      wx.getSetting({
        success: function (a) {
          a.authSetting["scope.userLocation"] ? wx.chooseLocation({
            success: function (a) {
              t.setData({
                mapx: a.latitude,
                mapy: a.longitude,
                mapname: a.address + a.name
              });
            }
          }) : wx.showModal({
            content: "请允许获取地理位置后再次尝试",
            success: function (a) {
              a.confirm ? wx.openSetting({}) : a.cancel && console.log("用户点击取消");
            }
          });
        }
      });
    },
    poster: function (a) {
      wx.navigateTo({
        url: "/pagesA/home/poster/index?carid=" + this.carInfo.id
      });
    },
    shouyewdj_btn: function () {
      console.log(123), wx.switchTab({
        url: "/pages/index/index"
      }), app.globalData.data.appscene = 0;
    }
  }
};
</script>
<style>
@import "./carMessage.css";
</style>